import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const router = new VueRouter({
  mode: "history",
  routes: [
    {
      path: "/",
      redirect: "index",
    },
    {
      path: "/index",
      name: "index",
      component: () => import("../view/myIndex.vue"),
    },
    {
      path: "/goods",
      name: "goods",
      component: () => import("../view/myGoods.vue"),
    },
    {
      path: "/register",
      name: "register",
      component: () => import("../view/myRegister.vue"),
    },
    {
      path: "/login",
      name: "login",
      component: () => import("../view/myLogin.vue"),
    }
  ],
});


export default router;
